<template>
	<view>
		<u-collapse :arrow="true" :head-style="headStyle">
			<u-collapse-item :open="logisticsIndex == 0" :title="`物流${logisticsIndex + 1}`" v-for="(logistics, logisticsIndex) in list" :key="logisticsIndex">
				<u-cell-group>
					<u-cell-item title="物流分配" :arrow="false" :border-bottom="false" style="padding-bottom: 0;"></u-cell-item>
					<u-cell-item :arrow="false" style="padding: 0 20rpx;">
						<view v-for="(item, index) in logistics.ModultPrototypeDeliveryDetailList" :key="index" style="position: relative;">
							<u-cell-item title="品牌" :arrow="false" :value="item.GoodsBrandName"></u-cell-item>
							<u-cell-item title="代码及描述" :arrow="false" :value="item.ModeName"></u-cell-item>
							<u-cell-item :arrow="false">
								<u-row>
									<u-col :span="3"  style="font-weight: bold;">数量</u-col>
									<u-col :span="3"  style="font-weight: bold;">折扣</u-col>
									<u-col :span="3"  style="font-weight: bold;">单价</u-col>
									<u-col :span="3"  style="font-weight: bold;">小计</u-col>
								</u-row>
								<u-row >
									<u-col :span="3" >{{item.Num}}</u-col>
									<u-col :span="3" >{{item.Discount}}</u-col>
									<u-col :span="3" >{{item.StandardAmount}}</u-col>
									<u-col :span="3" >{{item.AmountSubtotal}}</u-col>
								</u-row>
							</u-cell-item>
							<u-gap bg-color="#f5f5f5" :height="5"></u-gap>
						</view>
					</u-cell-item>
					<u-cell-item title="物流公司" :arrow="false" :value="logistics.LogisticsDetail.LogisticsCompany"></u-cell-item>
					<u-cell-item title="物流单号" :arrow="false" :value="logistics.LogisticsDetail.LogisticsNo"></u-cell-item>
					<u-cell-item title="联系人" :arrow="false" :value="logistics.LogisticsDetail.Customer_Name"></u-cell-item>
					<u-cell-item title="手机号" :arrow="false" :value="logistics.LogisticsDetail.Customer_Phone"></u-cell-item>
					<u-cell-item title="发货时间" :arrow="false" :value="logistics.LogisticsDetail.DeliverTime | date('yyyy-mm-dd hh:MM')"></u-cell-item>
					<u-cell-item title="备注" :arrow="false">
						<u-input type="textarea" inputAlign="right" :disabled="true" placeholder="" :value="logistics.LogisticsDetail.Remark"></u-input>
					</u-cell-item>
					<u-cell-item title="快递信息" :arrow="false" style="padding-bottom: 0;" :border-bottom="false"></u-cell-item>
					<u-cell-item :arrow="false" style="">
						<u-time-line style="margin-left: 30rpx;">
							<u-time-line-item v-for="(item, index) in logistics.Log_Html.data" :key="index">
								<view class="u-node" slot="node"></view>
								<template v-slot:content>
									<view>
										<view class="u-order-desc u-text-left">{{item.context}}</view>
										<view class="u-order-time u-text-left">{{item.time}}</view>
									</view>
								</template>
							</u-time-line-item>
						</u-time-line>
					</u-cell-item>
				</u-cell-group>
			</u-collapse-item>
		</u-collapse>
	</view>
</template>

<script>
export default {
	name: 'logistics-information',
	props: {
		list: {
			type: Array,
			default() {
				return [];
			}
		}
	},
	data() {
		return {
			headStyle: {
				backgroundColor: '#F3F3F3',
				paddingLeft: '30rpx',
				fontWeight: 'blod'
			}
		};
	},

	methods: {}
};
</script>

<style lang="scss">
	.u-node {
		width: 15rpx;
		height: 15rpx;
		border-radius: 50%;
		display: flex;
		justify-content: center;
		align-items: center;
		background: #FF7A23;
	}
	
</style>
